#ifndef _INPUT_H
#define _INPUT_H

//#define STRICT
#define DIRECTINPUT_VERSION 0x0800

#include <windows.h>
#include <commctrl.h>
#include <dinput.h>
#include <string.h>
#include <tchar.h>
#include <minmax.h>

#include <assert.h>

//	/* Include this file only once */
//	#pragma once

/* Mirus Input Manager class */
class mrInputManager
{
	protected:
	/* DirectInput objects */
	LPDIRECTINPUT8 m_lpkDInput;

	/* Singleton */
	static mrInputManager * m_pkSingleton;

	public:
	/* Constructors / Destructor */
	 mrInputManager();
	~mrInputManager();

	/* Input devices manipulation routines */
	bool Init (HINSTANCE hInstance);
	LPDIRECTINPUT8 GetInput();

	/* Singleton */
	static mrInputManager * GetSingleton();
};

class mrKeyboard
{
protected:
	// DirectInput objects 
	LPDIRECTINPUTDEVICE8 m_lpkDIDevice;

	 // Our key buffer 
	char m_iKeyBuffer[256];

public:
	// Constructors / Destructor 
	mrKeyboard();
	~mrKeyboard();

	// Keyboard manipulation routines 
	bool Init(HWND hWindow);
	bool Update();

	bool IsButtonDown(unsigned int iButton);
	bool IsButtonUp(unsigned int iButton);
};

#endif
